%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SIMULATION
% Assignment 1 - Task 2
% Daniel Markl
% Abdul Rahman Dastagir
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

close all;
% clear all;

measurementTime = 0.1;
t = 0:measurementTime:(length(A_yy)-1)*measurementTime;

figure()
hold on
plot(t,A_nn)
plot(t,A_ny,'r')
plot(t,A_yn,'--')
plot(t,A_yy,'g')

h = legend('overload control off, retrial off','overload control off, retrial on', 'overload control on, retrial off', 'overload control on, retrial on',4);
set(h,'Interpreter','none')

xlabel('Time [s]');
ylabel('Number of location updates');
hold off;

% print( '-dpng',  '-r600', 'measurement21' );